$(function () {

    var token = localStorage.wdczy_token;
    var tradeNo = getUrlParam(decodeURIComponent(location.href), 'tradeNo');
    if (isNullOrEmpty(tradeNo)) {
        history.go(-1);
    } else {
        AjaxGetOrderItem(token, tradeNo);
    }

});

function AjaxGetOrderItem(token, tradeNo) {
    var post_url = toRoute('api/order/item');
    $.post(post_url, {'token': token, 'tradeNo': tradeNo}, function (data) {
        if (data.errorCode == '200') {
            if (data.data.state == 1) {
                $('.payedBox .top p').html(parseFloat(data.data.money));
            } else {
                setTimeout(function () {
                    AjaxGetOrderItem(token, tradeNo);
                }, 1000);
            }
        }
    }, 'json');
}

function jumpToMine(){
    //埋点——我的
    tar.hitTag('mineClick');
    window.location.href = 'mine.html';
}

function sharebgShow(){
    $(".sharebg").removeClass("dis_none").addClass("dis_block");
}
function sharebgHide(){
    $(".sharebg").removeClass("dis_block").addClass("dis_none");
}
$(document).ready(function(){
    $(".sharebg").removeClass("dis_block").addClass("dis_none");
})

